package jwcb.javapjframework.ms_template.service.controller;

import jwcb.javapjframework.common.redis.RedisService.service.RedisService;
import jwcb.javapjframework.ms_template.service.service.TestRedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

// TestController.java
@RestController
@RequestMapping("/api/redis-test")
public class TestRedisController {

    @Autowired
    private TestRedisService testService;

    @GetMapping("/basic")
    public String testBasicOperations() {
        return testService.testBasicOperations();

    }

    @GetMapping("/expiration")
    public String testExpiration() throws InterruptedException {
            return testService.testExpiration();
    }


}